/*INCLUDES-------------------------------------------------------------------*/

#include <avr/io.h>
#include <util/delay.h>

#include "ses_display.h"
#include "ses_common.h"

/*PRIVATE PROTOTYPES---------------------------------------------------------*/

/**
 * Writes a byte into the RAM of the selected LCD controller
 *
 * @param data	a byte to write
 */
static void writeData(uint8_t data);

/**
 * Writes a command to the selected LCD controller
 * @param	a byte to write
 */
static void writeCommand(uint8_t data);

/**
 * Selects one controller of the LCD
 * @param sel	selected controller (either 0 or 1)
 */
static void selectController(uint8_t sel);

/**
 * Reads status byte from  selected LCD controller
 */
static uint8_t readStatus();

/**
 * Waits until the selected controller is non-busy.
 */
static void waitBusy();


/*FUNCTION DEFINITION--------------------------------------------------------*/

void display_init() {

	// TODO

}

void display_write(uint8_t page, uint8_t column, uint8_t data) {
	// TODO
}

void display_clear() {
	// TODO
}

void writeData(uint8_t data) {
	waitBusy();

	// TODO
}

void writeCommand(uint8_t data) {
	waitBusy();
	
	// TODO
}

uint8_t readStatus() {

	// TODO

	return 0;// TODO
}

void selectController(uint8_t sel) {
	// TODO
}

void waitBusy() {
	// TODO
}

